<template>
  <div class="box">
    <!-- mv的播放以及头部标题 -->
    <div class="left">
      <div class="top">
        <div class="back" @click="back"><i class="el-icon-back"></i></div>
        <div>视频详情</div>
      </div>
      <VideoPlay />
    </div>
    <div style="width: 40%">
      <Right />
    </div>
    <div class="loading" v-if="show === true">
      <i class="el-icon-loading"></i>
    </div>
  </div>
</template>

<script>
import VideoPlay from '../../../components/videoCom/play.vue';
import Right from '../../../components/videoCom/rightBar.vue';

export default {
  components: {
    VideoPlay,
    Right,
  },
  beforeRouteLeave(to, from, next) {
    this.show = true
    next()
  },
  data() {
    return {
      show: false,
    }
  },
  methods: {
    back() {
      this.$router.push('/pageTwo/videoRec');
    },
  },
};
</script>

<style scoped>
.box {
  display: flex;
  margin-bottom: 40px;
}

.left {
  display: flex;
  flex-direction: column;
  width: 60%;
}

.top {
  display: flex;
  align-items: center;
  font-size: 20px;
}

.back {
  font-size: 30px;
}
</style>
